package com.chinasofti.project.service;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.chinasofti.project.common.pageQuery.PageInfo;
import com.chinasofti.project.common.pageQuery.PageResult;
import com.chinasofti.project.dal.mapper.TestMapper;
import com.chinasofti.project.dal.model.BzUser;

/**
 *
 * @author Lucas
 *
 * @Date 2018年9月27日 下午3:10:56
 *
 */
@Service("testService")
public class TestServiceImpl implements TestService {

	@Autowired
	private TestMapper testMapper;

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.chinasofti.project.service.TestService#search2(com.chinasofti.project
	 * .service.UserQueryInfo)
	 */
	@Override
	public PageResult<BzUser> search2(UserQueryInfo info) {
		System.out.println(info);
		List<BzUser> userList = testMapper.search2(info);
		// pageResult测试用伪造之
		return new PageResult<>(10, info.getPageSize(), userList);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.chinasofti.project.service.TestService#search(java.util.Date,
	 * java.util.Date, java.lang.String,
	 * com.chinasofti.project.common.pageQuery.PageInfo)
	 */
	@Override
	public PageResult<BzUser> search(Date start, Date end, String username, PageInfo info) {
		List<BzUser> userList = testMapper.search1(start, end, username, info);
		// pageResult测试用伪造之
		return new PageResult<>(10, 10, userList);
	}

}
